Rules for integrands of the form (((d Trig[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)

0:  ∫u (((a+b ((Tan[e+f x])^2)))^p)dx  when a==b

Derivation: Algebraic simplification

Basis: 1+((Tan[z])^2)==((Sec[z])^2)

Rule: If  a==b, then

∫u (((a+b ((Tan[e+f x])^2)))^p)dx  ⟶  ∫u (((a ((Sec[e+f x])^2)))^p)dx

Program code:

Int[u_.*(a_+b_.*tan[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  Int[ActivateTrig[u*(a*sec[e+f*x]^2)^p],x] /;
FreeQ[{a,b,e,f,p},x] && EqQ[a,b]

1.  ∫(((d Trig[e+f x]))^m) (((b (((c Tan[e+f x]))^n)))^p)dx  when  p∉ℤ

1:  ∫u (((b ((Tan[e+f x])^n)))^p)dx  when  p∉ℤ ∧ n∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((b ((Tan[e+f x])^n)))^p)/((Tan[e+f x])^(n p)))==0

Rule: If  p∉ℤ ∧ n∈ℤ, then

∫u (((b ((Tan[e+f x])^n)))^p)dx  ⟶  (((b^(IntPart[p])) (((b ((Tan[e+f x])^n)))^(FracPart[p])))/((Tan[e+f x])^(n FracPart[p]))) ∫u ((Tan[e+f x])^(n p))dx

Program code:

Int[u_.*(b_.*tan[e_.+f_.*x_]^n_)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  (b*ff^n)^IntPart[p]*(b*Tan[e+f*x]^n)^FracPart[p]/(Tan[e+f*x]/ff)^(n*FracPart[p])*
    Int[ActivateTrig[u]*(Tan[e+f*x]/ff)^(n*p),x]] /;
FreeQ[{b,e,f,n,p},x] && Not[IntegerQ[p]] && IntegerQ[n] && 
  (EqQ[u,1] || MatchQ[u,(d_.*trig_[e+f*x])^m_. /; FreeQ[{d,m},x] && MemberQ[{sin,cos,tan,cot,sec,csc},trig]])

2:  ∫u (((b (((c Tan[e+f x]))^n)))^p)dx  when  p∉ℤ ∧ n∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((b (((c Tan[e+f x]))^n)))^p)/(((c Tan[e+f x]))^(n p)))==0

Rule: If  p∉ℤ ∧ n∉ℤ, then

∫(((b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (((b^(IntPart[p])) (((b (((c Tan[e+f x]))^n)))^(FracPart[p])))/(((c Tan[e+f x]))^(n FracPart[p]))) ∫(((c Tan[e+f x]))^(n p))dx

Program code:

Int[u_.*(b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  b^IntPart[p]*(b*(c*Tan[e+f*x])^n)^FracPart[p]/(c*Tan[e+f*x])^(n*FracPart[p])*
    Int[ActivateTrig[u]*(c*Tan[e+f*x])^(n*p),x] /;
FreeQ[{b,c,e,f,n,p},x] && Not[IntegerQ[p]] && Not[IntegerQ[n]] && 
  (EqQ[u,1] || MatchQ[u,(d_.*trig_[e+f*x])^m_. /; FreeQ[{d,m},x] && MemberQ[{sin,cos,tan,cot,sec,csc},trig]])

2.  ∫(((a+b (((c Tan[e+f x]))^n)))^p)dx

1:  ∫(1/(a+b ((Tan[e+f x])^2)))dx  when  a≠b

Derivation: Algebraic expansion

Basis: (1/(a+b ((Tan[z])^2)))==(1/(a-b))-((b ((Sec[z])^2))/((a-b) (a+b ((Tan[z])^2))))

Rule: If  a≠b, then

∫(1/(a+b ((Tan[e+f x])^2)))dx  ⟶  (x/(a-b))-(b/(a-b))∫(((Sec[e+f x])^2)/(a+b ((Tan[e+f x])^2)))dx

Program code:

Int[1/(a_+b_.*tan[e_.+f_.*x_]^2),x_Symbol] :=
  x/(a-b) - b/(a-b)*Int[Sec[e+f*x]^2/(a+b*Tan[e+f*x]^2),x] /;
FreeQ[{a,b,e,f},x] && NeQ[a,b]

2:  ∫(((a+b (((c Tan[e+f x]))^n)))^p)dx  when (n|p)∈ℤ ∨ p∈(SuperPlus[ℤ])∨ (n^2)==4 ∨ (n^2)==16

Derivation: Integration by substitution

Basis: F[c Tan[e+f x]]==(c/f)Subst[((F[x])/((c^2)+(x^2))),x,c Tan[e+f x]](∂_x)(c Tan[e+f x])

Note: If (n|p)∈ℤ ∨ p∈(SuperPlus[ℤ])∨ (n^2)==4 ∨ (n^2)==16, then ((((a+b (x^n)))^p)/((c^2)+(x^2))) is integrable.

Rule: If (n|p)∈ℤ ∨ p∈(SuperPlus[ℤ])∨ (n^2)==4 ∨ (n^2)==16, then

∫(((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (c/f)Subst[∫((((a+b (x^n)))^p)/((c^2)+(x^2)))dx,x,c Tan[e+f x]]

Program code:

Int[(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  c*ff/f*Subst[Int[(a+b*(ff*x)^n)^p/(c^2+ff^2*x^2),x],x,c*Tan[e+f*x]/ff]] /;
FreeQ[{a,b,c,e,f,n,p},x] && (IntegersQ[n,p] || IGtQ[p,0] || EqQ[n^2,4] || EqQ[n^2,16])

X:  ∫(((a+b (((c Tan[e+f x]))^n)))^p)dx

Rule:

∫(((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  ∫(((a+b (((c Tan[e+f x]))^n)))^p)dx

Program code:

Int[(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(a+b*(c*Tan[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,e,f,n,p},x]

3.  ∫(((d Sin[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

1:  ∫((Sin[e+f x])^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  (m/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Sin[z])^2)==(((Tan[z])^2)/(1+((Tan[z])^2)))

Basis: If (m/2)∈ℤ, then ((Sin[e+f x])^m) F[c Tan[e+f x]]==(c/f)Subst[(((x^m) F[x])/((((c^2)+(x^2)))^((m/2)+1))),x,c Tan[e+f x]](∂_x)(c Tan[e+f x])

Rule: If (m/2)∈ℤ, then

∫((Sin[e+f x])^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (c/f)Subst[∫(((x^m) (((a+b (x^n)))^p))/((((c^2)+(x^2)))^((m/2)+1)))dx,x,c Tan[e+f x]]

Program code:

Int[sin[e_.+f_.*x_]^m_*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  c*ff^(m+1)/f*Subst[Int[x^m*(a+b*(ff*x)^n)^p/(c^2+ff^2*x^2)^(m/2+1),x],x,c*Tan[e+f*x]/ff]] /;
FreeQ[{a,b,c,e,f,n,p},x] && IntegerQ[m/2]

2.  ∫((Sin[e+f x])^m) (((a+b ((Tan[e+f x])^n)))^p)dx

1:  ∫((Sin[e+f x])^m) (((a+b ((Tan[e+f x])^2)))^p)dx  when ((m-1)/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==-1+((Sec[z])^2)

Basis: If ((m-1)/2)∈ℤ, then ((Sin[e+f x])^m) F[((Tan[e+f x])^2)]==(1/f) Subst[ (((((-1+(x^2)))^((m-1)/2)) F[-1+(x^2)])/(x^(m+1))),x,Sec[e+f x]](∂_x)Sec[e+f x]

Rule: If ((m-1)/2)∈ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Tan[e+f x])^2)))^p)dx  ⟶  (1/f) Subst[∫(((((-1+(x^2)))^((m-1)/2)) (((a-b+b (x^2)))^p))/(x^(m+1)))dx,x,Sec[e+f x]]

Program code:

Int[sin[e_.+f_.*x_]^m_.*(a_+b_.*tan[e_.+f_.*x_]^2)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sec[e+f*x],x]},
  1/(f*ff^m)*Subst[Int[(-1+ff^2*x^2)^((m-1)/2)*(a-b+b*ff^2*x^2)^p/x^(m+1),x],x,Sec[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[(m-1)/2]

2:  ∫((Sin[e+f x])^m) (((a+b ((Tan[e+f x])^n)))^p)dx  when ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==-1+((Sec[z])^2)

Basis: If ((m-1)/2)∈ℤ, then ((Sin[e+f x])^m) F[((Tan[e+f x])^2)]==(1/f) Subst[ (((((-1+(x^2)))^((m-1)/2)) F[-1+(x^2)])/(x^(m+1))),x,Sec[e+f x]](∂_x)Sec[e+f x]

Rule: If ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ, then

∫((Sin[e+f x])^m) (((a+b ((Tan[e+f x])^n)))^p)dx  ⟶  (1/f) Subst[∫(((((-1+(x^2)))^((m-1)/2)) (((a+b (((-1+(x^2)))^(n/2))))^p))/(x^(m+1)))dx,x,Sec[e+f x]]

Program code:

Int[sin[e_.+f_.*x_]^m_.*(a_+b_.*tan[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sec[e+f*x],x]},
  1/(f*ff^m)*Subst[Int[(-1+ff^2*x^2)^((m-1)/2)*(a+b*(-1+ff^2*x^2)^(n/2))^p/x^(m+1),x],x,Sec[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[(m-1)/2] && IntegerQ[n/2]

3:  ∫(((d Sin[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((d Sin[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  ∫ExpandTrig[(((d Sin[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p),x]dx

Program code:

Int[(d_.*sin[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Int[ExpandTrig[(d*sin[e+f*x])^m*(a+b*(c*tan[e+f*x])^n)^p,x],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && IGtQ[p,0]

4:  ∫(((d Sin[e+f x]))^m) (((a+b ((Tan[e+f x])^2)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)(((((d Sin[e+f x]))^m) (((((Sec[e+f x])^2)))^(m/2)))/((Tan[e+f x])^m))==0

Basis: F[Tan[e+f x]]==(1/f)Subst[((F[x])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If  m∉ℤ, then

∫(((d Sin[e+f x]))^m) (((a+b ((Tan[e+f x])^2)))^p)dx  ⟶  (((((d Sin[e+f x]))^m) (((((Sec[e+f x])^2)))^(m/2)))/((Tan[e+f x])^m)) ∫((((Tan[e+f x])^m) (((a+b ((Tan[e+f x])^2)))^p))/(((1+((Tan[e+f x])^2)))^(m/2)))dx

  ⟶  (((((d Sin[e+f x]))^m) (((((Sec[e+f x])^2)))^(m/2)))/(f ((Tan[e+f x])^m))) Subst[∫(((x^m) (((a+b (x^2)))^p))/(((1+(x^2)))^(m/2+1))) dx,x,Tan[e+f x]]

Program code:

Int[(d_.*sin[e_.+f_.*x_])^m_*(a_+b_.*tan[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff*(d*Sin[e+f*x])^m*(Sec[e+f*x]^2)^(m/2)/(f*Tan[e+f*x]^m)*
    Subst[Int[(ff*x)^m*(a+b*ff^2*x^2)^p/(1+ff^2*x^2)^(m/2+1),x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m,p},x] && Not[IntegerQ[m]]

X:  ∫(((d Sin[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Rule:

∫(((d Sin[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  ∫(((d Sin[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*sin[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Sin[e+f*x])^m*(a+b*(c*Tan[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x]

4:  ∫(((d Cos[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Cos[e+f x]))^m) (((((Sec[e+f x])/d)))^m))==0

Rule: If  m∉ℤ, then

∫(((d Cos[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (((d Cos[e+f x]))^(FracPart[m])) (((((Sec[e+f x])/d)))^(FracPart[m])) ∫(((((Sec[e+f x])/d)))^(-m)) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*cos[e_.+f_.*x_])^m_*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  (d*Cos[e+f*x])^FracPart[m]*(Sec[e+f*x]/d)^FracPart[m]*Int[(Sec[e+f*x]/d)^(-m)*(a+b*(c*Tan[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]

5.  ∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

1:  ∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when p∈(SuperPlus[ℤ])∨ n==2 ∨ n==4 ∨ a==0

Derivation: Integration by substitution

Basis: F[c Tan[e+f x]]==(c/f)Subst[((F[x])/((c^2)+(x^2))),x,c Tan[e+f x]](∂_x)(c Tan[e+f x])

Rule: If p∈(SuperPlus[ℤ])∨ n==2 ∨ n==4 ∨ a==0, then

∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (c/f)Subst[∫(((((d x)/c)))^m) ((((a+b (x^n)))^p)/((c^2)+(x^2)))dx,x,c Tan[e+f x]]

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  c*ff/f*Subst[Int[(d*ff*x/c)^m*(a+b*(ff*x)^n)^p/(c^2+ff^2*x^2),x],x,c*Tan[e+f*x]/ff]] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && (IGtQ[p,0] || EqQ[n,2] || EqQ[n,4] || IntegerQ[p] && RationalQ[n])

2:  ∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  ∫ExpandTrig[(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p),x]dx

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Int[ExpandTrig[(d*tan[e+f*x])^m*(a+b*(c*tan[e+f*x])^n)^p,x],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && IGtQ[p,0]

X:  ∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Rule:

∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  ∫(((d Tan[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*tan[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Tan[e+f*x])^m*(a+b*(c*Tan[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x]

6.  ∫(((d Cot[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  m∉ℤ

1:  ∫(((d Cot[e+f x]))^m) (((a+b ((Tan[e+f x])^n)))^p)dx  when  m∉ℤ ∧ (n|p)∈ℤ

Derivation: Algebraic normalization

Basis: If (n|p)∈ℤ, then (((a+b ((Tan[e+f x])^n)))^p)==(d^(n p))(((d Cot[e+f x]))^(-n p)) (((b+a ((Cot[e+f x])^n)))^p)

Rule: If  m∉ℤ ∧ (n|p)∈ℤ, then

∫(((d Cot[e+f x]))^m) (((a+b ((Tan[e+f x])^n)))^p)dx  ⟶   (d^(n p)) ∫(((d Cot[e+f x]))^(m-n p)) (((b+a ((Cot[e+f x])^n)))^p)dx

Program code:

Int[(d_.*cot[e_.+f_.*x_])^m_*(a_+b_.*tan[e_.+f_.*x_]^n_.)^p_.,x_Symbol] :=
  d^(n*p)*Int[(d*Cot[e+f*x])^(m-n*p)*(b+a*Cot[e+f*x]^n)^p,x] /;
FreeQ[{a,b,d,e,f,m,n,p},x] && Not[IntegerQ[m]] && IntegersQ[n,p]

2:  ∫(((d Cot[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Cot[e+f x]))^m) (((((Tan[e+f x])/d)))^m))==0

Rule: If  m∉ℤ, then

∫(((d Cot[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (((d Cot[e+f x]))^(FracPart[m])) (((((Tan[e+f x])/d)))^(FracPart[m])) ∫(((((Tan[e+f x])/d)))^(-m)) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*cot[e_.+f_.*x_])^m_*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  (d*Cot[e+f*x])^FracPart[m]*(Tan[e+f*x]/d)^FracPart[m]*Int[(Tan[e+f*x]/d)^(-m)*(a+b*(c*Tan[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]

7.  ∫(((d Sec[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

1:  ∫((Sec[e+f x])^m)(((a+b (((c Tan[e+f x]))^n)))^p)dx  when  (m/2)∈ℤ ∧ ((n|p)∈ℤ ∨ (m/2)∈(SuperPlus[ℤ])∨ p∈(SuperPlus[ℤ])∨ (n^2)==4 ∨ (n^2)==16)

Derivation: Integration by substitution

Basis: If (m/2)∈ℤ, then ((Sec[e+f x])^m) F[c Tan[e+f x]]==(1/((c^(m-1))f))Subst[((((c^2)+(x^2)))^((m/2)-1)) F[x],x,c Tan[e+f x]](∂_x)(c Tan[e+f x])

Note: If (n|p)∈ℤ ∨ (m/2)∈(SuperPlus[ℤ])∨ p∈(SuperPlus[ℤ])∨ (n^2)==4 ∨ (n^2)==16, then ((((c^2)+(x^2)))^((m/2)-1)) (((a+b (x^n)))^p) is integrable.

Rule: If (m/2)∈ℤ ∧ ((n|p)∈ℤ ∨ (m/2)∈(SuperPlus[ℤ])∨ p∈(SuperPlus[ℤ])∨ (n^2)==4 ∨ (n^2)==16), then

∫((Sec[e+f x])^m)(((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (1/((c^(m-1))f))Subst[∫((((c^2)+(x^2)))^((m/2)-1)) (((a+b (x^n)))^p)dx,x,c Tan[e+f x]]

Program code:

Int[sec[e_.+f_.*x_]^m_*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff/(c^(m-1)*f)*Subst[Int[(c^2+ff^2*x^2)^(m/2-1)*(a+b*(ff*x)^n)^p,x],x,c*Tan[e+f*x]/ff]] /;
FreeQ[{a,b,c,e,f,n,p},x] && IntegerQ[m/2] && (IntegersQ[n,p] || IGtQ[m,0] || IGtQ[p,0] || EqQ[n^2,4] || EqQ[n^2,16])

2.  ∫((Sec[e+f x])^m) (((a+b ((Tan[e+f x])^n)))^p)dx  when ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ

1:  ∫((Sec[e+f x])^m)(((a+b ((Tan[e+f x])^n)))^p)dx  when ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==(((Sin[z])^2)/(1-((Sin[z])^2)))

Basis: If ((m-1)/2)∈ℤ, then ((Sec[e+f x])^m) F[((Tan[e+f x])^2)]==(1/f) Subst[((F[((x^2)/(1-(x^2)))])/(((1-(x^2)))^((m+1)/2))),x,Sin[e+f x]](∂_x)Sin[e+f x]

Rule: If ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∈ℤ, then

∫((Sec[e+f x])^m)(((a+b ((Tan[e+f x])^n)))^p)dx  ⟶  (1/f)Subst[∫((((b (x^n)+a (((1-(x^2)))^(n/2))))^p)/(((1-(x^2)))^((1/2) (m+n p+1))))dx,x,Sin[e+f x]]

Program code:

Int[sec[e_.+f_.*x_]^m_.*(a_+b_.*tan[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff/f*Subst[Int[ExpandToSum[b*(ff*x)^n+a*(1-ff^2*x^2)^(n/2),x]^p/(1-ff^2*x^2)^((m+n*p+1)/2),x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,e,f},x] && IntegerQ[(m-1)/2] && IntegerQ[n/2] && IntegerQ[p]

2:  ∫((Sec[e+f x])^m)(((a+b ((Tan[e+f x])^n)))^p)dx  when ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∉ℤ

Derivation: Integration by substitution

Basis: ((Tan[z])^2)==(((Sin[z])^2)/(1-((Sin[z])^2)))

Basis: If ((m-1)/2)∈ℤ, then ((Sec[e+f x])^m) F[((Tan[e+f x])^2)]==(1/f) Subst[((F[((x^2)/(1-(x^2)))])/(((1-(x^2)))^((m+1)/2))),x,Sin[e+f x]](∂_x)Sin[e+f x]

Rule: If ((m-1)/2)∈ℤ ∧ (n/2)∈ℤ ∧ p∉ℤ, then

∫((Sec[e+f x])^m)(((a+b ((Tan[e+f x])^n)))^p)dx  ⟶  (1/f)Subst[∫(1/(((1-(x^2)))^((m+1)/2))) (((((b (x^n)+a (((1-(x^2)))^(n/2)))/(((1-(x^2)))^(n/2)))))^p)dx,x,Sin[e+f x]]

Program code:

Int[sec[e_.+f_.*x_]^m_.*(a_+b_.*tan[e_.+f_.*x_]^n_)^p_.,x_Symbol] :=
  With[{ff=FreeFactors[Sin[e+f*x],x]},
  ff/f*Subst[Int[1/(1-ff^2*x^2)^((m+1)/2)*((b*(ff*x)^n+a*(1-ff^2*x^2)^(n/2))/(1-ff^2*x^2)^(n/2))^p,x],x,Sin[e+f*x]/ff]] /;
FreeQ[{a,b,e,f,p},x] && IntegerQ[(m-1)/2] && IntegerQ[n/2] && Not[IntegerQ[p]]

3:  ∫(((d Sec[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  p∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  p∈(SuperPlus[ℤ]), then

∫(((d Sec[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  ∫ExpandTrig[(((d Sec[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p),x]dx

Program code:

Int[(d_.*sec[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Int[ExpandTrig[(d*sec[e+f*x])^m*(a+b*(c*tan[e+f*x])^n)^p,x],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && IGtQ[p,0]

4:  ∫(((d Sec[e+f x]))^m) (((a+b ((Tan[e+f x])^2)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: (∂_x)((((d Sec[e+f x]))^m)/(((((Sec[e+f x])^2)))^(m/2)))==0

Basis: F[Tan[e+f x]]==(1/f)Subst[((F[x])/(1+(x^2))),x,Tan[e+f x]](∂_x)Tan[e+f x]

Rule: If  m∉ℤ, then

∫(((d Sec[e+f x]))^m) (((a+b ((Tan[e+f x])^2)))^p)dx  ⟶  ((((d Sec[e+f x]))^m)/(((((Sec[e+f x])^2)))^(m/2))) ∫(((1+((Tan[e+f x])^2)))^(m/2)) (((a+b ((Tan[e+f x])^2)))^p)dx

  ⟶  ((((d Sec[e+f x]))^m)/(f (((((Sec[e+f x])^2)))^(m/2)))) Subst[∫(((1+(x^2)))^(m/2-1)) (((a+b (x^2)))^p) dx,x,Tan[e+f x]]

Program code:

Int[(d_.*sec[e_.+f_.*x_])^m_*(a_+b_.*tan[e_.+f_.*x_]^2)^p_,x_Symbol] :=
  With[{ff=FreeFactors[Tan[e+f*x],x]},
  ff*(d*Sec[e+f*x])^m/(f*(Sec[e+f*x]^2)^(m/2))*
    Subst[Int[(1+ff^2*x^2)^(m/2-1)*(a+b*ff^2*x^2)^p,x],x,Tan[e+f*x]/ff]] /;
FreeQ[{a,b,d,e,f,m,p},x] && Not[IntegerQ[m]]

X:  ∫(((d Sec[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Rule:

∫(((d Sec[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  ∫(((d Sec[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*sec[e_.+f_.*x_])^m_.*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_.,x_Symbol] :=
  Unintegrable[(d*Sec[e+f*x])^m*(a+b*(c*Tan[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x]

8:  ∫(((d Csc[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  when  m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((d Csc[e+f x]))^m) (((((Sin[e+f x])/d)))^m))==0

Rule: If  m∉ℤ, then

∫(((d Csc[e+f x]))^m) (((a+b (((c Tan[e+f x]))^n)))^p)dx  ⟶  (((d Csc[e+f x]))^(FracPart[m])) (((((Sin[e+f x])/d)))^(FracPart[m])) ∫(((((Sin[e+f x])/d)))^(-m)) (((a+b (((c Tan[e+f x]))^n)))^p)dx

Program code:

Int[(d_.*csc[e_.+f_.*x_])^m_*(a_+b_.*(c_.*tan[e_.+f_.*x_])^n_)^p_,x_Symbol] :=
  (d*Csc[e+f*x])^FracPart[m]*(Sin[e+f*x]/d)^FracPart[m]*Int[(Sin[e+f*x]/d)^(-m)*(a+b*(c*Tan[e+f*x])^n)^p,x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[m]]